home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
sos3-2.lha
/
src
/
sys
/
sys.h
Wrap
C/C++ Source or Header
|
1992-01-23
|
1KB
|
56 lines
/* --------------------------------------------------------------------------
* Copyright 1992 by Forschungszentrum Informatik (FZI)
*
* You can use and distribute this software under the terms of the licence
* you should have received along with this program.
* If not or if you want additional information, write to
* Forschungszentrum Informatik, "STONE", Haid-und-Neu-Strasse 10-14,
* D-7500 Karlsruhe 1, Germany.
* --------------------------------------------------------------------------
*/
#ifndef SYSH
#define SYSH 1
#include <string.h>
#define MOD %
#define AND &&
#define OR ||
#define NOT !
#define EQ ==
#define NEQ !=
#define PTR *
#define REF(x) (&(x))
#define CONT(x) (*(x))
#define BITAND &
#define BITOR |
#define BITXOR ^
#define BITCPL(x) ~(x)
#define SMALL(n) (char)( (n) & 0x80) ? (~0x7F|(n)) : (n))
#define USMALL(n) (unsigned)((n) & 0xFF)
#define RSHIFT(n,b) ((b<(sizeof(n)*8)) ? (unsigned) (n)>>(b) : 0)
#define LSHIFT(n,b) ((b<(sizeof(n)*8)) ? (n)<<(b) : 0)
#define EXPORT
#define LOCAL static
#define EOL '\n'
#define EOS '\0'
#define TAB '\t'
#define FF '\f'
#define streql NOT strcmp
#ifdef __cplusplus
inline char* strdup(const char *s1) // wz 19/11/91
{
return strcpy (new char[strlen(s1) + 1], s1);
}
#endif
#endif